package com.ztgf.commodity.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ztgf.commodity.models.dto.CategoryBrandAttributesRelationDTO;
import com.ztgf.commodity.models.vo.CategoryBrandAttributesVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/*
 * @author: chenyu.wang
 * @date: 2020-09-09
 * @description:类目品牌属性关系表映射
 */
@Mapper
public interface CategoryBrandAttributesRelationMapper extends BaseMapper<CategoryBrandAttributesRelationDTO> {

    /**
     * @Description: 根据类目id获取关联的品牌信息
     * @Author: chenyu.wang
     * @Params: [categoryId]
     * @Date: 2020.11.10 14:41
     */
    List<CategoryBrandAttributesVO> queryByCategoryId(@Param(value = "categoryId") Long categoryId);

    /**
     * @Description: 获取标签id是否存在es中的商品数量
     * @Author: chenyu.wang
     * @Params: [labelId]
     * @Date: 2020.12.18 11:08
     */
    Integer getLabelGoodsNum(@Param("labelId") Long labelId);
}
